package org.ruanjj.stringtabledemo;

public class StringExe {
    String str = "good";
    char[] ch = new char[]{'t','e','s','t'};

    public void change(String strNew, char[] chNew){
        str = strNew;
        ch = chNew;
    }

    public void change1(String strNew, char[] chNew){
        strNew = "hello";
        chNew = new char[]{'w','a'};
    }

    public static void main(String[] args) {
        StringExe stringExe = new StringExe();
        stringExe.change1(stringExe.str, stringExe.ch);
        System.out.println(stringExe.str);
        System.out.println(stringExe.ch);

        stringExe.change("hello", new char[]{'b','e','s','t'});
        System.out.println(stringExe.str);
        System.out.println(stringExe.ch);

        String data = new String("adc");
        System.out.println(data.intern());
    }
}
